<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 转炉终点预测系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link rel="stylesheet" href="styles/unified.css">
    <style>
        :root {
            --login-primary: #1976d2;
            --login-primary-light: #42a5f5;
            --login-primary-dark: #0d47a1;
            --login-primary-gradient: linear-gradient(135deg, #1976d2, #42a5f5);
            --login-text-light: #ffffff;
            --login-text-dark: #333333;
            --login-bg-light: #f5f7fa;
            --login-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --login-radius: 12px;
            --login-transition: all 0.3s ease;
        }
        
        body {
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
            background-color: var(--login-bg-light);
            overflow: hidden;
        }
        
        .login-container {
            display: flex;
            width: 100%;
            height: 100%;
            position: relative;
        }
        
        .login-banner {
            flex: 1;
            background: linear-gradient(135deg, #0a2e4d, #1976d2);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: var(--login-text-light);
            padding: 0 4%;
            position: relative;
            overflow: hidden;
        }
        
        /* 粒子背景 */
        #particles-js {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 1;
        }
        
        /* 科技网格效果 */
        .tech-grid {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                linear-gradient(rgba(25, 118, 210, 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(25, 118, 210, 0.05) 1px, transparent 1px);
            background-size: 20px 20px;
            z-index: 2;
        }
        
        /* 浮动元素 */
        .floating-element {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(5px);
            z-index: 2;
            animation: float 15s infinite ease-in-out;
        }
        
        .floating-element:nth-child(1) {
            width: 100px;
            height: 100px;
            top: 10%;
            left: 10%;
            animation-delay: 0s;
        }
        
        .floating-element:nth-child(2) {
            width: 150px;
            height: 150px;
            top: 60%;
            left: 15%;
            animation-delay: -5s;
        }
        
        .floating-element:nth-child(3) {
            width: 80px;
            height: 80px;
            top: 30%;
            left: 75%;
            animation-delay: -2s;
        }
        
        .floating-element:nth-child(4) {
            width: 120px;
            height: 120px;
            top: 70%;
            left: 70%;
            animation-delay: -7s;
        }
        
        @keyframes float {
            0%, 100% {
                transform: translateY(0) rotate(0deg);
            }
            25% {
                transform: translateY(-15px) rotate(5deg);
            }
            50% {
                transform: translateY(5px) rotate(-5deg);
            }
            75% {
                transform: translateY(-10px) rotate(2deg);
            }
        }
        
        /* 数据流动画 */
        .data-stream {
            position: absolute;
            width: 2px;
            background: linear-gradient(to bottom, transparent, rgba(66, 165, 245, 0.5), transparent);
            z-index: 2;
            animation: dataFlow 8s infinite linear;
            opacity: 0;
        }
        
        @keyframes dataFlow {
            0% {
                transform: translateY(-100%);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                transform: translateY(100vh);
                opacity: 0;
            }
        }
        
        .banner-content {
            position: relative;
            z-index: 5;
            max-width: 500px;
            text-align: center;
        }
        
        .banner-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
        }
        
        .banner-logo-icon {
            width: 60px;
            height: 60px;
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
        }
        
        .banner-logo-icon i {
            font-size: 30px;
        }
        
        .banner-logo-text {
            font-size: 28px;
            font-weight: 600;
        }
        
        .banner-title {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 20px;
            line-height: 1.2;
        }
        
        .banner-description {
            font-size: 16px;
            line-height: 1.6;
            margin-bottom: 30px;
            opacity: 0.9;
        }
        
        .banner-features {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 40px;
            gap: 20px;
        }
        
        .feature-item {
            display: flex;
            align-items: center;
            background-color: rgba(255, 255, 255, 0.1);
            padding: 12px 20px;
            border-radius: var(--login-radius);
            width: calc(50% - 10px);
            backdrop-filter: blur(5px);
        }
        
        .feature-icon {
            width: 40px;
            height: 40px;
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            flex-shrink: 0;
        }
        
        .feature-text {
            font-size: 14px;
            font-weight: 500;
        }
        
        /* 登录表单容器样式优化 */
        .login-form-container {
            width: 450px;
            background-color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 0 60px;
            box-shadow: var(--login-shadow);
            position: relative;
            overflow: hidden;
            z-index: 10;
        }
        
        /* 表单背景装饰 */
        .login-form-container::before {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 100px;
            height: 100px;
            background: var(--login-primary-light);
            opacity: 0.05;
            border-radius: 50%;
            z-index: -1;
        }
        
        .login-form-container::after {
            content: '';
            position: absolute;
            bottom: -80px;
            left: -80px;
            width: 180px;
            height: 180px;
            background: var(--login-primary-light);
            opacity: 0.05;
            border-radius: 50%;
            z-index: -1;
        }
        
        .login-header {
            margin-bottom: 40px;
            position: relative;
        }
        
        .login-title {
            font-size: 28px;
            font-weight: 600;
            color: var(--login-text-dark);
            margin-bottom: 10px;
            position: relative;
            display: inline-block;
        }
        
        .login-title::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 40px;
            height: 3px;
            background: var(--login-primary-gradient);
            border-radius: 2px;
        }
        
        .login-subtitle {
            font-size: 15px;
            color: #666;
        }
        
        .login-form {
            display: flex;
            flex-direction: column;
        }
        
        .form-group {
            margin-bottom: 25px;
            position: relative;
        }
        
        .form-label {
            display: block;
            font-size: 14px;
            color: #555;
            margin-bottom: 8px;
            font-weight: 500;
            transition: var(--login-transition);
        }
        
        .form-input-container {
            position: relative;
            overflow: hidden;
        }
        
        .form-input {
            width: 100%;
            padding: 14px 15px 14px 45px;
            font-size: 15px;
            border: 1px solid #e1e1e1;
            border-radius: var(--login-radius);
            transition: var(--login-transition);
            box-sizing: border-box;
            background-color: #f8f9fa;
            color: #495057;
        }
        
        .form-input:focus {
            border-color: var(--login-primary);
            box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
            outline: none;
            background-color: #fff;
        }
        
        .form-input:focus + .form-input-line {
            transform: scaleX(1);
        }
        
        .form-input-line {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--login-primary-gradient);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.3s ease;
        }
        
        .form-input-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #adb5bd;
            transition: var(--login-transition);
            font-size: 16px;
        }
        
        .form-input:focus ~ .form-input-icon {
            color: var(--login-primary);
        }
        
        .password-toggle {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #adb5bd;
            cursor: pointer;
            transition: var(--login-transition);
            z-index: 2;
        }
        
        .password-toggle:hover {
            color: var(--login-primary);
        }
        
        .remember-forgot {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }
        
        /* 自定义复选框 */
        .checkbox-container {
            display: flex;
            align-items: center;
            position: relative;
        }
        
        .custom-checkbox {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            height: 0;
            width: 0;
        }
        
        .checkbox-mark {
            position: relative;
            display: inline-block;
            width: 18px;
            height: 18px;
            margin-right: 8px;
            background-color: #f8f9fa;
            border: 1px solid #e1e1e1;
            border-radius: 4px;
            transition: var(--login-transition);
        }
        
        .custom-checkbox:checked ~ .checkbox-mark {
            background-color: var(--login-primary);
            border-color: var(--login-primary);
        }
        
        .checkbox-mark:after {
            content: "";
            position: absolute;
            display: none;
            left: 6px;
            top: 2px;
            width: 5px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }
        
        .custom-checkbox:checked ~ .checkbox-mark:after {
            display: block;
        }
        
        .checkbox-label {
            font-size: 14px;
            color: #666;
            cursor: pointer;
            user-select: none;
        }
        
        .forgot-password {
            font-size: 14px;
            color: var(--login-primary);
            text-decoration: none;
            transition: var(--login-transition);
            font-weight: 500;
        }
        
        .forgot-password:hover {
            color: var(--login-primary-dark);
            text-decoration: underline;
        }
        
        .btn-login {
            background: var(--login-primary-gradient);
            color: white;
            border: none;
            border-radius: var(--login-radius);
            padding: 14px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--login-transition);
            box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }
        
        .btn-login:hover {
            box-shadow: 0 6px 15px rgba(25, 118, 210, 0.3);
            transform: translateY(-2px);
        }
        
        .btn-login:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
        }
        
        .btn-login::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5px;
            height: 5px;
            background: rgba(255, 255, 255, 0.5);
            opacity: 0;
            border-radius: 100%;
            transform: scale(1, 1) translate(-50%);
            transform-origin: 50% 50%;
        }
        
        @keyframes ripple {
            0% {
                transform: scale(0, 0);
                opacity: 0.5;
            }
            100% {
                transform: scale(20, 20);
                opacity: 0;
            }
        }
        
        .btn-login.btn-ripple::after {
            animation: ripple 1s ease-out;
        }
        
        .login-divider {
            display: flex;
            align-items: center;
            margin: 20px 0;
            color: #999;
        }
        
        .login-divider::before,
        .login-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background-color: #e1e1e1;
        }
        
        .login-divider span {
            padding: 0 15px;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .social-login {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 30px;
        }
        
        .social-button {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background-color: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #555;
            transition: var(--login-transition);
            cursor: pointer;
            border: none;
            position: relative;
            overflow: hidden;
        }
        
        .social-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        }
        
        .social-button.weixin {
            color: #fff;
            background-color: #07C160;
        }
        
        .social-button.qq {
            color: #fff;
            background-color: #12B7F5;
        }
        
        .social-button.mobile {
            color: #fff;
            background-color: #FF9500;
        }
        
        .social-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.1);
            transform: scale(0);
            transition: 0.5s;
            border-radius: 50%;
        }
        
        .social-button:hover::before {
            transform: scale(1);
        }
        
        .login-footer {
            text-align: center;
            font-size: 14px;
            color: #666;
            margin-top: 20px;
        }
        
        .signup-link {
            color: var(--login-primary);
            text-decoration: none;
            font-weight: 600;
            transition: var(--login-transition);
        }
        
        .signup-link:hover {
            color: var(--login-primary-dark);
            text-decoration: underline;
        }
        
        /* 登录加载动画 */
        .login-loading {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.9);
            z-index: 100;
            align-items: center;
            justify-content: center;
            flex-direction: column;
        }
        
        .login-loading.show {
            display: flex;
        }
        
        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid rgba(25, 118, 210, 0.1);
            border-radius: 50%;
            border-top-color: var(--login-primary);
            animation: spin 1s ease-in-out infinite;
            margin-bottom: 10px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .login-loading-text {
            color: var(--login-primary);
            font-size: 16px;
            font-weight: 500;
        }
        
        /* 登录成功动画 */
        .login-success {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.9);
            z-index: 100;
            align-items: center;
            justify-content: center;
            flex-direction: column;
        }
        
        .login-success.show {
            display: flex;
        }
        
        .success-checkmark {
            width: 50px;
            height: 50px;
            margin-bottom: 15px;
        }
        
        .check-icon {
            width: 50px;
            height: 50px;
            position: relative;
            border-radius: 50%;
            box-sizing: content-box;
            border: 2px solid #4CAF50;
        }
        
        .check-icon::before {
            top: 28px;
            left: 14px;
            transform: rotate(45deg);
            width: 6px;
            height: 12px;
        }
        
        .check-icon::after {
            top: 24px;
            left: 18px;
            transform: rotate(135deg);
            width: 12px;
            height: 6px;
        }
        
        .check-icon::before,
        .check-icon::after {
            content: '';
            position: absolute;
            display: block;
            background-color: transparent;
            border-bottom: 2px solid #4CAF50;
            border-right: 2px solid #4CAF50;
        }
        
        @keyframes check {
            0% {
                height: 0;
                width: 0;
                opacity: 0;
            }
            20% {
                height: 0;
                width: 6px;
                opacity: 1;
            }
            40% {
                height: 12px;
                width: 6px;
            }
            100% {
                height: 12px;
                width: 6px;
            }
        }
        
        .success-text {
            color: #4CAF50;
            font-size: 18px;
            font-weight: 500;
        }
        
        .login-error {
            display: none;
            background-color: #FFF3F3;
            border-left: 3px solid #F44336;
            color: #F44336;
            padding: 10px 15px;
            margin-bottom: 20px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
        }
        
        .login-error.show {
            display: block;
        }
        
        @media (max-width: 1200px) {
            .login-form-container {
                width: 400px;
                padding: 0 40px;
            }
        }
        
        @media (max-width: 992px) {
            .login-banner {
                display: none;
            }
            
            .login-form-container {
                width: 100%;
                max-width: 500px;
                margin: 0 auto;
            }
        }
        
        @media (max-width: 576px) {
            .login-form-container {
                padding: 0 20px;
            }
            
            .feature-item {
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="login-container">
        <!-- 左侧横幅 -->
        <div class="login-banner">
            <!-- 动态科技背景 -->
            <div id="particles-js"></div>
            <div class="tech-grid"></div>
            <div class="floating-element"></div>
            <div class="floating-element"></div>
            <div class="floating-element"></div>
            <div class="floating-element"></div>
            
            <!-- 动态数据流 -->
            <div id="data-streams-container"></div>
            
            <div class="banner-content">
                <div class="banner-logo">
                    <div class="banner-logo-icon">
                        <i class="fas fa-industry"></i>
                    </div>
                    <div class="banner-logo-text">转炉终点预测系统</div>
                </div>
                <h1 class="banner-title">智能化冶炼工艺<br>数字化转型平台</h1>
                <p class="banner-description">
                    基于深度学习的智能冶炼辅助系统，通过实时分析转炉生产过程中的各项参数，预测转炉冶炼的终点状态，提高生产效率和产品质量。
                </p>
                <div class="banner-features">
                    <div class="feature-item">
                        <div class="feature-icon">
                            <i class="fas fa-chart-line"></i>
                        </div>
                        <div class="feature-text">实时数据监控与分析</div>
                    </div>
                    <div class="feature-item">
                        <div class="feature-icon">
                            <i class="fas fa-brain"></i>
                        </div>
                        <div class="feature-text">智能预测模型</div>
                    </div>
                    <div class="feature-item">
                        <div class="feature-icon">
                            <i class="fas fa-bullseye"></i>
                        </div>
                        <div class="feature-text">94.2%的预测准确率</div>
                    </div>
                    <div class="feature-item">
                        <div class="feature-icon">
                            <i class="fas fa-cogs"></i>
                        </div>
                        <div class="feature-text">工艺参数优化</div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 右侧登录表单 -->
        <div class="login-form-container">
            <div class="login-header">
                <h2 class="login-title">欢迎登录</h2>
                <p class="login-subtitle">请输入您的账号和密码</p>
            </div>
            
            <div class="login-error" id="loginError">
                <i class="fas fa-exclamation-circle"></i>
                <span id="errorMessage">用户名或密码错误</span>
            </div>
            
            <form class="login-form" id="loginForm">
                <div class="form-group">
                    <label for="username" class="form-label">用户名</label>
                    <div class="form-input-container">
                        <input type="text" id="username" name="username" class="form-input" placeholder="请输入用户名" required autocomplete="off">
                        <div class="form-input-line"></div>
                        <i class="fas fa-user form-input-icon"></i>
                    </div>
                </div>
                
                <div class="form-group">
                    <label for="password" class="form-label">密码</label>
                    <div class="form-input-container">
                        <input type="password" id="password" name="password" class="form-input" placeholder="请输入密码" required>
                        <div class="form-input-line"></div>
                        <i class="fas fa-lock form-input-icon"></i>
                        <i class="fas fa-eye password-toggle" id="passwordToggle"></i>
                    </div>
                </div>
                
                <div class="remember-forgot">
                    <div class="checkbox-container">
                        <input type="checkbox" id="remember" name="remember" class="custom-checkbox">
                        <span class="checkbox-mark"></span>
                        <label for="remember" class="checkbox-label">记住我</label>
                    </div>
                    <a href="#" class="forgot-password" id="forgotPassword">忘记密码?</a>
                </div>
                
                <button type="button" id="loginButton" class="btn-login">登录</button>
                
                <div class="login-divider">
                    <span>或使用其他方式登录</span>
                </div>
                
                <div class="social-login">
                    <button type="button" class="social-button weixin" id="weixinLogin">
                        <i class="fab fa-weixin"></i>
                    </button>
                    <button type="button" class="social-button qq" id="qqLogin">
                        <i class="fab fa-qq"></i>
                    </button>
                    <button type="button" class="social-button mobile" id="mobileLogin">
                        <i class="fas fa-mobile-alt"></i>
                    </button>
                </div>
                
                <div class="login-footer">
                    还没有账号? <a href="#" class="signup-link" id="contactAdmin">联系管理员</a>
                </div>
            </form>
            
            <!-- 登录加载状态 -->
            <div class="login-loading" id="loginLoading">
                <div class="spinner"></div>
                <div class="login-loading-text">正在登录...</div>
            </div>
            
            <!-- 登录成功状态 -->
            <div class="login-success" id="loginSuccess">
                <div class="success-checkmark">
                    <div class="check-icon"></div>
                </div>
                <div class="success-text">登录成功</div>
            </div>
        </div>
    </div>
    
    <!-- 粒子效果库 -->
    <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 初始化粒子效果
            if(typeof particlesJS !== 'undefined') {
                particlesJS('particles-js', {
                    "particles": {
                        "number": {
                            "value": 80,
                            "density": {
                                "enable": true,
                                "value_area": 800
                            }
                        },
                        "color": {
                            "value": "#ffffff"
                        },
                        "shape": {
                            "type": "circle",
                            "stroke": {
                                "width": 0,
                                "color": "#000000"
                            },
                            "polygon": {
                                "nb_sides": 5
                            }
                        },
                        "opacity": {
                            "value": 0.3,
                            "random": true,
                            "anim": {
                                "enable": false,
                                "speed": 1,
                                "opacity_min": 0.1,
                                "sync": false
                            }
                        },
                        "size": {
                            "value": 3,
                            "random": true,
                            "anim": {
                                "enable": false,
                                "speed": 40,
                                "size_min": 0.1,
                                "sync": false
                            }
                        },
                        "line_linked": {
                            "enable": true,
                            "distance": 150,
                            "color": "#ffffff",
                            "opacity": 0.2,
                            "width": 1
                        },
                        "move": {
                            "enable": true,
                            "speed": 2,
                            "direction": "none",
                            "random": false,
                            "straight": false,
                            "out_mode": "out",
                            "bounce": false,
                            "attract": {
                                "enable": false,
                                "rotateX": 600,
                                "rotateY": 1200
                            }
                        }
                    },
                    "interactivity": {
                        "detect_on": "canvas",
                        "events": {
                            "onhover": {
                                "enable": true,
                                "mode": "grab"
                            },
                            "onclick": {
                                "enable": true,
                                "mode": "push"
                            },
                            "resize": true
                        },
                        "modes": {
                            "grab": {
                                "distance": 140,
                                "line_linked": {
                                    "opacity": 0.4
                                }
                            },
                            "bubble": {
                                "distance": 400,
                                "size": 40,
                                "duration": 2,
                                "opacity": 8,
                                "speed": 3
                            },
                            "repulse": {
                                "distance": 200,
                                "duration": 0.4
                            },
                            "push": {
                                "particles_nb": 4
                            },
                            "remove": {
                                "particles_nb": 2
                            }
                        }
                    },
                    "retina_detect": true
                });
            }
            
            // 创建数据流动画
            createDataStreams();
            
            // 密码显示切换
            const passwordToggle = document.getElementById('passwordToggle');
            const passwordInput = document.getElementById('password');
            
            if(passwordToggle) {
                passwordToggle.addEventListener('click', function() {
                    const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
                    passwordInput.setAttribute('type', type);
                    
                    // 切换图标
                    this.classList.toggle('fa-eye');
                    this.classList.toggle('fa-eye-slash');
                });
            }
            
            // 登录按钮点击效果
            const loginButton = document.getElementById('loginButton');
            
            if(loginButton) {
                loginButton.addEventListener('click', function(e) {
                    e.preventDefault();
                    
                    // 添加波纹效果
                    this.classList.add('btn-ripple');
                    setTimeout(() => {
                        this.classList.remove('btn-ripple');
                    }, 800);
                    
                    // 获取表单数据
                    const username = document.getElementById('username').value;
                    const password = document.getElementById('password').value;
                    
                    // 表单验证
                    if(!username || !password) {
                        showError('请输入用户名和密码');
                        return;
                    }
                    
                    // 显示加载状态
                    document.getElementById('loginLoading').classList.add('show');
                    
                    // 模拟登录请求
                    setTimeout(() => {
                        // 隐藏加载状态
                        document.getElementById('loginLoading').classList.remove('show');
                        
                        // 修改后的登录验证逻辑，接受任何账号密码
                        if(username && password) {
                            // 登录成功
                            document.getElementById('loginSuccess').classList.add('show');
                            
                            // 2秒后跳转到首页
                            setTimeout(() => {
                                window.location.href = 'index.html';
                            }, 1500);
                        } else {
                            // 登录失败，仅当用户名或密码为空时
                            showError('用户名或密码不能为空');
                        }
                    }, 1500);
                });
            }
            
            // 回车键提交表单
            const loginForm = document.getElementById('loginForm');
            if(loginForm) {
                loginForm.addEventListener('keypress', function(e) {
                    if (e.key === 'Enter') {
                        e.preventDefault();
                        loginButton.click();
                    }
                });
            }
            
            // 社交登录按钮
            const socialButtons = document.querySelectorAll('.social-button');
            socialButtons.forEach(button => {
                button.addEventListener('click', function() {
                    alert('社交登录功能开发中，敬请期待！');
                });
            });
            
            // 忘记密码
            const forgotPassword = document.getElementById('forgotPassword');
            if(forgotPassword) {
                forgotPassword.addEventListener('click', function(e) {
                    e.preventDefault();
                    alert('请联系系统管理员重置密码！');
                });
            }
            
            // 联系管理员
            const contactAdmin = document.getElementById('contactAdmin');
            if(contactAdmin) {
                contactAdmin.addEventListener('click', function(e) {
                    e.preventDefault();
                    alert('请联系系统管理员申请账号！');
                });
            }
        });
        
        // 创建数据流动画
        function createDataStreams() {
            const container = document.getElementById('data-streams-container');
            if(!container) return;
            
            const bannerWidth = document.querySelector('.login-banner').offsetWidth;
            
            // 创建20个数据流
            for(let i = 0; i < 20; i++) {
                const stream = document.createElement('div');
                stream.className = 'data-stream';
                
                // 随机位置和高度
                const height = Math.floor(Math.random() * 200) + 100;
                const left = Math.floor(Math.random() * bannerWidth);
                
                stream.style.height = `${height}px`;
                stream.style.left = `${left}px`;
                stream.style.animationDelay = `${Math.random() * 8}s`;
                
                container.appendChild(stream);
            }
        }
        
        // 显示错误信息
        function showError(message) {
            const errorElement = document.getElementById('loginError');
            const errorMessageElement = document.getElementById('errorMessage');
            
            if(errorElement && errorMessageElement) {
                errorMessageElement.textContent = message;
                errorElement.classList.add('show');
                
                // 3秒后自动隐藏
                setTimeout(() => {
                    errorElement.classList.remove('show');
                }, 3000);
            }
        }
    </script>
</body>
</html> 